package com.dayuanit.dy15.atm.mapper;

import com.dayuanit.dy15.atm.domain.CardFlowDomain;
import com.dayuanit.dy15.atm.domain.FlowDomain;
import com.dayuanit.dy15.atm.entity.Card;
import com.dayuanit.dy15.atm.entity.Flow;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FlowMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Flow record);

    int insertSelective(Flow record);

    Flow selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Flow record);

    int updateByPrimaryKey(Flow record);

    List<FlowDomain> listFlow(@Param("cardId") Long cardId,
                              @Param("offset") Integer offset,
                              @Param("pageSize") Integer pageSize);

    int countFlow(Long cardId);

    List<FlowDomain> listTop10(Long userId);

    List<FlowDomain> listCardFlow(Long cardId);

    List<CardFlowDomain> statisticCardFlow(Long cardId);
}